﻿using Ndns.Packet.Abstractions;
using System.Collections.Generic;

namespace Ndns.ServerHost.Abstractions
{
    public abstract class DnsResponse
    {
        public abstract DnsContext DnsContext { get; }

        /// <summary>
        /// 表明服务器是域的权威
        /// </summary>
        public abstract bool ServerAuthoritative { get; set; }

        /// <summary>
        /// 表示服务器可以进行递归查询
        /// </summary>
        public abstract bool RecursionAvailable { get; set; }

        /// <summary>
        /// 表示应答已经经过权威认证
        /// </summary>
        public abstract bool AnswerAuthenticated { get; set; }

        /// <summary>
        /// 应答码
        /// </summary>
        public abstract DnsReplyCode ReplyCode { get; set; }

        /// <summary>
        /// 应答集合
        /// </summary>
        public abstract IList<DnsResourceRecord> AnswerRRs { get; }

        /// <summary>
        /// 权威应答集合
        /// </summary>
        public abstract IList<DnsResourceRecord> AuthoritativeNSs { get; }

        /// <summary>
        /// 额外应答集合
        /// </summary>
        public abstract IList<DnsResourceRecord> AdditionalRRs { get; }

        /// <summary>
        /// 对请求采取忽略的措施
        /// </summary>
        public abstract bool IgnoreRequest { get; set; }
    }
}
